package com.daxia.ogmall.model;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import com.daxia.ogmall.model.BaseModel;


/**
 * Space
 */
@Entity
@Table(name = "space") 
public class Space extends BaseModel {
	
	public Space() {
	}
	
	public Space(Long id) {
		this.id = id;
	}
	
	/**
	 * id
	 */
	@Id
	@GeneratedValue
	@Column(name = "id")
    private Long id;
	/**
	 * 空间名称
	 */
	@Column(name = "name")
    private String name;
	
	@OneToMany(mappedBy = "space")
	private List<SpaceObject> objects = new ArrayList<SpaceObject>();

	private Integer seq;
	
	public Long getId() {
    	return id;
    }
	
    public void setId(Long id) {
    	this.id = id;
    }
	
	public String getName() {
    	return name;
    }
	
    public void setName(String name) {
    	this.name = name;
    }

	public List<SpaceObject> getObjects() {
		return objects;
	}

	public void setObjects(List<SpaceObject> objects) {
		this.objects = objects;
	}

	public Integer getSeq() {
		return seq;
	}

	public void setSeq(Integer seq) {
		this.seq = seq;
	}
	
}
